Skip to content

Fix RichTextBox flooding AT channel with entire document on focus#14675

Open
trypsynth wants to merge 1 commit into
dotnet:mainfrom
trypsynth:fix/richtextbox-focus-accessibility-flooding
Open

Fix RichTextBox flooding AT channel with entire document on focus#14675
trypsynth wants to merge 1 commit into
dotnet:mainfrom
trypsynth:fix/richtextbox-focus-accessibility-flooding

Conversation

@trypsynth

@trypsynth trypsynth commented Jun 25, 2026

Copy link
Copy Markdown

Fixes #14671

Proposed changes

Removes the explicit UIA automation notification from OnGotFocus that was sending the full Text of the control to assistive technology on every focus event. For large documents this caused NVDA and JAWS to freeze, and produced a double-announcement (the native MSAA focus event already reads the current line correctly). The pass-through override is kept to satisfy the shipped public API surface.

Customer Impact

Any rich text box with a lot of content in it risks freezing user's assistive technologies.

Regression?

  • No

Risk

  • None

Test methodology

Created a basic winforms app, created a RichTextBox inside it, gave it 6 lines, tested without my custom assembly and with, my custom version fixes the bug.

Accessibility testing

Tested with NVDA on Windows 11 24H2.

Test environment(s)

.NET SDK:
Version: 10.0.202
Commit: 1e7d5a8ae3
Workload version: 10.0.200-manifests.f96d7f23
MSBuild version: 18.3.3+1e7d5a8ae

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.202\

.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
Version: 10.0.6
Architecture: x64
Commit: 47fb725acf

.NET SDKs installed:
10.0.202 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 10.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Microsoft Reviewers: Open in CodeFlow

Removes the explicit UIA automation notification from OnGotFocus that
was sending the full Text of the control to assistive technology on
every focus event. For large documents this caused NVDA and JAWS to
freeze, and produced a double-announcement (the native MSAA focus event
already reads the current line correctly). The pass-through override is
kept to satisfy the shipped public API surface.

Closes dotnet#14671
@trypsynth trypsynth requested a review from a team as a code owner June 25, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RichTextBox always sends its entire contents as an accessibility event on focus

1 participant